class QuotationRecordBean {
  int? id;
  String? quotationDate;
  String? personCharge;
  String? customerCompanyName;
  String? customerRegion;
  String? contactPerson;
  String? phone;
  String? source;
  String? monthlyOrPackage;
  String? quotation;
  String? followUp;
  String? result;
  String? dateRange;
  String? createDate;

  QuotationRecordBean(
      {this.id,
      this.quotationDate,
      this.personCharge,
      this.customerCompanyName,
      this.customerRegion,
      this.contactPerson,
      this.phone,
      this.source,
      this.monthlyOrPackage,
      this.quotation,
      this.followUp,
      this.result,
      this.dateRange,
      this.createDate});

  factory QuotationRecordBean.fromJson(Map<String, dynamic> json) {
    return QuotationRecordBean(
      id: json['id'],
      quotationDate: json['quotationDate'],
      personCharge: json['personCharge'],
      customerCompanyName: json['customerCompanyName'],
      customerRegion: json['customerRegion'],
      contactPerson: json['contactPerson'],
      phone: json['phone'],
      source: json['source'],
      monthlyOrPackage: json['monthlyOrPackage'],
      quotation: json['quotation'],
      followUp: json['followUp'],
      result: json['result'] ?? "成功",
      dateRange: json['dateRange'],
      createDate: json['createDate'],
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'quotationDate': quotationDate,
      'personCharge': personCharge,
      'customerCompanyName': customerCompanyName,
      'customerRegion': customerRegion,
      'contactPerson': contactPerson,
      'phone': phone,
      'source': source,
      'monthlyOrPackage': monthlyOrPackage,
      'quotation': quotation,
      'followUp': followUp,
      'result': result,
      'dateRange': dateRange,
      'createDate': createDate,
    };
  }

  QuotationRecordBean.empty(){
    DateTime now = DateTime.now();
    String createDate = "${now.year}-${now.month.toString().padLeft(2, '0')}-${now.day.toString().padLeft(2, '0')}";
    quotationDate = "";
    personCharge = "";
    customerCompanyName = "";
    customerRegion = "";
    contactPerson = "";
    phone = "";
    source = "";
    monthlyOrPackage = "";
    quotation = "";
    followUp = "";
    result = "成功";
    dateRange = "2025-09-18";
    createDate = createDate;
  }
}
